home *** CD-ROM | disk | FTP | other *** search
- Heap Management:
-
- You must allocate 4 bytes for a header record (no. 0)
- the number of records currently is stored in !heap%
-
- FNlocate(record%)
- Returns the memory pointer for record%
- FNcreate(size%)
- Allocates memory for new record
- PROCdelete(record%)
- Deletes record% and shrinks heap if possible
-
- The size of the record% is stored at !FNlocate(record%)
- You can maintain this value if you want (I havn't needed to ... yet)
- Try to release all blocks when you've finished or an error occurs.
-
- Binary Tree:
-
- PROCputintree(name$)
- name$ is name to enter (e.g. the sprite name)
- FNfindintree(name$)
- returns record% pointer if exists or 0 if it's non-existent
-
- Internall the binary tree uses direct pointers (not record number pointers)
- This speeds things up by about 60% for !IconHunt but makes things less flexible
- especially if you want to use relocatable blocks. See TechFile for the slower
- but more flexible routines.